package com.ruoyi.community.mapper;

import com.ruoyi.community.domain.EcRestaurants;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface EcRestaurantsMapper {
    int deleteByPrimaryKey(Long restaurantId);

    int insert(EcRestaurants record);

    int insertSelective(EcRestaurants record);

    EcRestaurants selectByPrimaryKey(Long restaurantId);

    int updateByPrimaryKeySelective(EcRestaurants record);

    int updateByPrimaryKey(EcRestaurants record);

    List<EcRestaurants> selectAllRestaurants();

    /**
     * 查询社区电商
     *
     * @param restaurantId 社区电商ID
     * @return 社区电商
     */
    public EcRestaurants selectEcRestaurantsById(Long restaurantId);


    public List<EcRestaurants> selectByCommunityIdAndName(Map map);

    public List<EcRestaurants> selectByCommunityIdAndCategory(Map map);

    //public List<EcRestaurants> selectByCommunityIdAndName1(@Param("communityId") String communityId, @Param("name") String name);


    /**
     * 查询社区电商列表
     *
     * @param ecRestaurants 社区电商
     * @return 社区电商集合
     */
    public List<EcRestaurants> selectEcRestaurantsList(EcRestaurants ecRestaurants);

    /**
     * 根据社区ID查询社区电商列表
     */
    public List<EcRestaurants> selectEcRestaurantsListByCommunity(Integer communityId);



    /**
     * 新增社区电商
     *
     * @param ecRestaurants 社区电商
     * @return 结果
     */
    public int insertEcRestaurants(EcRestaurants ecRestaurants);

    /**
     * 修改社区电商
     *
     * @param ecRestaurants 社区电商
     * @return 结果
     */
    public int updateEcRestaurants(EcRestaurants ecRestaurants);

    /**
     * 删除社区电商
     *
     * @param restaurantId 社区电商ID
     * @return 结果
     */
    public int deleteEcRestaurantsById(Long restaurantId);

    /**
     * 批量删除社区电商
     *
     * @param restaurantIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteEcRestaurantsByIds(Long[] restaurantIds);
}